I do not believe that God struck that child down in punishment of David because he states that he does not punish the child for the father.
Oh, now I get it. The bible doesn't really mean what it says in one place, because it says something contradictory elsewhere.
So what is a person to believe, then? The parts that show God to be a vengeful, bloodthirsty SOB, with a warped sense of justice, or the contradictory parts that say he couldn't possibly behave in such a way?